<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title th:text="#{login.title}">用户登录</title>
    <link th:href="@{/login/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/login/css/login.css}" rel="stylesheet">
</head>
<body class="text-center bg-light">
<div class="container">
    <form class="form-signin" th:action="@{/login}" method="post">
        <h1 class="h2 mb-4" th:text="#{login.title}" style="text-align: center">用户登录</h1>
        <input type="text" class="form-control mb-3"
               th:placeholder="#{login.username}" required autofocus>
        <input type="password" class="form-control mb-3"
               th:placeholder="#{login.password}" required>
        <div class="form-check mb-4">
            <input type="checkbox" class="form-check-input" id="rememberMe" value="remember-me">
            <label class="form-check-label" th:for="rememberMe" th:text="#{login.rememberme}">记住我</label>
        </div>
        <button class="btn btn-primary btn-block" type="submit" th:text="#{login.button}">登录</button>
        <p class="mt-5 mb-3 text-muted">
            © <span th:text="${currentYear}">2025</span>-<span th:text="${currentYear + 1}">2026</span>
        </p>
        <div>
            <a class="btn btn-link" th:href="@{/login(l='zh_CN')}">中文</a>
            <a class="btn btn-link" th:href="@{/login(l='en_US')}">English</a>
        </div>
    </form>
</div>
</body>
</html>